<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Welcome to online CHAT</title>
<script language="javascript">
    
    var chat_url="chatclient.html"
    
    var user_id=""
    
    var password=""
    
    var debug_msg = ""
    
    function login(){
        //values are assumed to be validated in applet.login_page
        debug.logMsg("Calling Login:" + user_id + ", " + password)
        var bool = serverConnector.login(user_id, password)
    	if(bool == "true") {
            //load chat program with user_id set
            window.location.href = chat_url;
        } else {
            //load fail screen???
        }
        
    }
    
    function debugMsg() {
        debug.logMsg(debug_msg)
    }
        
    </script>
</head>
<body bgcolor = "lightblue">
	<div align="center">
		<h2>"WELCOME TO ONLINE CHAT"</h2>
    	<p> Existing Users </p>
    	<p><Applet Code="applet.login_page.class" archive="csci656.jar" width=200 Height=100>
            Welcome to Login Page!!!
     	</Applet>
        <Applet id="serverConnector" code="applet.ServerConnector.class" archive="csci656.jar" width=0 height=0></applet></p>
    	<P><i> New User ?</i></P> <p><i>Register using following link</i></p>
    	<p><a href ="Newuser-register.html">Register- New User</a></p>
        <Applet id="debug" code="applet.debugWindow.class" archive="csci656.jar" width=300 height=100></Applet>
    </div>
 </body>  
</html>